using Headsight.BPMN2WF.BPMN.Model;
using Headsight.BPMN2WF.Testing.TestObjCtors;
using Headsight.BPMN2WF.Transformation.Transformers.Additions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Rhino.Mocks;

namespace Headsight.BPMN2WF.Transformation.Transformers.NoGoodName
{
    [TestClass]
    public abstract class BPMN2WFTransformationDelegateBaseImplTestFixture<T> where T : BPMN2WFTransformationDelegateBaseImpl
    {
        protected T _sut;
        protected IBPMN2WFTransformation _delegate;
        protected BPMNFlowNode _bpmnFlowNode;
        protected IBPMN2WFTransformationContext _ctx;

        [TestInitialize]
        public void SetUpFixture()
        {
            _delegate = MockRepository.GenerateStub<IBPMN2WFTransformation>();

            _bpmnFlowNode = new BPMNFlowNodeCtor().Create();
            _ctx = new BPMN2WFTransformationContextCtor().Create();

            _sut = CreateSut(_delegate);
        }

        protected abstract T CreateSut(IBPMN2WFTransformation @delegate);

        [TestMethod]
        public void Delegate()
        {
            Assert.AreSame(_delegate, _sut.Delegate);
        }
    }
}